import base from "../base.js"
export default class extends base {

    // 渲染页面
    render() {
        this.el.html(`
        <div class="layui-layout layui-layout-admin">
            <div class="layui-header">
                <div class="layui-logo">学生管理系统</div>
                <ul class="layui-nav layui-layout-left">
                </ul>
                <ul class="layui-nav layui-layout-right">
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <span id="usname" >${`张三`}</span>
                        </a>
                    </li>
                    <li class="layui-nav-item"> <a href="#/login">退出登录</a></li>
                </ul>
            </div>
            <!-- 侧边导航 -->
            <div class="layui-side layui-bg-black" lay-filter="demo22">
                <div class="layui-side-scroll">
                    <ul class="layui-nav layui-nav-tree" lay-filter="test">
                        <li class="layui-nav-item layui-nav-itemed">
                            <a class="" href="javascript:;">学生管理</a>
                            <dl class="layui-nav-child">
                                <dd><a href="#/info/students-list" >学生列表</a></dd>
                                <dd><a href="#/info/add-students">新增学生</a></dd>
                         
                            </dl>
                        </li>
                    </ul>
                </div>
            </div>
            <div id="info-content"  class="layui-body">
            
       
            
           </div>
        </div>
    `
    
    
    );
    

    }
    // 加载事件
    handle() {

        layui.use('carousel', function(){
            var carousel = layui.carousel;
            //建造实例
            carousel.render({
              elem: '#test1'
              ,width: '100%' //设置容器宽度
              ,arrow: 'always' //始终显示箭头
              ,anim: 'fade' //切换动画方式
            });
          });

    }
}